<?php
/*
    Id:     $Id: $
    File:   RESTResource.php
    Author: John Griffin
    Date:   May 6, 2009

    Description:
*/
abstract class RestController {
    protected $resource = null;
    public function __construct (SimpleXMLElement $resource) {
        $this->resource = $resource;
    }
        
    protected function resourceCreated ($message = '') {
        header('HTTP/1.0 201 Created');
        header($message);
    }
    
    protected function resourceModified ($message = '') {
        header('HTTP/1.0 200 OK');
        header($message);
    }
    
    protected function resourceDeleted ($message = '') {
        header('HTTP/1.0 200 OK');
        header($message);
    }
    
    protected function processingError ($message = '') {
        header('HTTP/1.0 400 Bad Request');
        header($message);
    }

    abstract public function delete (array $ids);
    abstract public function get (array $arguments, array $modifiers);
    abstract public function post (array $arguments);
    abstract public function put (array $arguments);
}
?>